module(
    name = "grpc",
    compatibility_level = 1,
    repo_name = "com_github_grpc_grpc",
    version = "1.56.3.bcr.1",
)

bazel_dep(name = "bazel_skylib", version = "1.2.0")
bazel_dep(name = "platforms", version = "0.0.8")
bazel_dep(name = "boringssl", version = "0.0.0-20230215-5c22014")
bazel_dep(name = "c-ares", repo_name = "com_github_cares_cares", version = "1.15.0")
bazel_dep(name = "abseil-cpp", repo_name = "com_google_absl", version = "20220623.1")
bazel_dep(name = "protobuf", repo_name = "com_google_protobuf", version = "3.19.2")
bazel_dep(name = "re2", repo_name = "com_googlesource_code_re2", version = "2021-09-01")
bazel_dep(name = "rules_proto", version = "4.0.0")
bazel_dep(name = "upb", version = "0.0.0-20230516-61a97ef")
bazel_dep(name = "zlib", version = "1.2.13")
bazel_dep(name = "rules_java", version = "5.1.0")
bazel_dep(name = "rules_go", repo_name = "io_bazel_rules_go", version = "0.39.1")
bazel_dep(name = "googletest", version = "1.14.0.bcr.1", repo_name = "com_google_googletest")
bazel_dep(name = "rules_cc", version = "0.0.9")

grpc_repo_deps_ext = use_extension("//bazel:grpc_deps.bzl", "grpc_repo_deps_ext")

use_repo(
    grpc_repo_deps_ext,
    "com_envoyproxy_protoc_gen_validate",
    "com_google_googleapis",
    "com_github_cncf_udpa",
    "envoy_api",
    "io_opencensus_cpp",
)

grpc_extra_deps_ext = use_extension("//bazel:grpc_extra_deps.bzl", "grpc_extra_deps_ext")

use_repo(grpc_extra_deps_ext, "com_google_googleapis_imports")

bazel_dep(name = "rules_python", version = "0.29.0")

PYTHON_VERSIONS = [
    "3.8",
    "3.9",
    "3.10",
    "3.11",
    "3.12",
]

python = use_extension("@rules_python//python/extensions:python.bzl", "python")
[
    python.toolchain(
        is_default = python_version == PYTHON_VERSIONS[-1],
        python_version = python_version,
    )
    for python_version in PYTHON_VERSIONS
]

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
[
    pip.parse(
        hub_name = "grpc_python_dependencies",
        python_version = python_version,
        requirements_lock = "//:requirements.bazel.txt",
    )
    for python_version in PYTHON_VERSIONS
]
use_repo(pip, "grpc_python_dependencies")
grpc_python_deps_ext = use_extension("//bazel:grpc_python_deps.bzl", "grpc_python_deps_ext")
use_repo(grpc_python_deps_ext, "cython")
